<template>
  <div id="orderdetail">
    <div class="odtopinfo">
      <p><span class="llabel">订单编号：</span>{{orderdata.ocode}}</p>
      <p><span class="llabel">下单时间：</span>{{orderdata.otamp}}</p>
      <p><span class="llabel">订单状态：</span>{{orderdata.ostatus}}</p>
      <!-- <p><span class="llabel">订单来源：</span>{{orderdata.ofrom}}</p>
      <p><span class="llabel">门店编号：</span>{{orderdata.ofromcode}}</p>
      <p><span class="llabel">获得积分：</span>{{orderdata.opoints}}</p> -->
    </div>
    <div class="oddatainfo">
      <div class="oddpitem" v-for="iitem in orderdata.datainfo">
        <div class="oddpright">
          <div class="oddprl"><p class="oddptitle">{{iitem.ptitle}}</p><p class="oddpweight">规格：{{iitem.pweight}}</p></div>
          <div class="oddprr"><p class="oddpprice">{{iitem.pprice}}积分</p><p class="oddpnums">&Chi;{{iitem.pnum}}</p></div>
        </div>
      </div>
    </div>
    <div class="odbottominfo">
      <p><span class="llabel">商品总价：</span>{{orderdata.oprice}}积分</p>
      <!-- <p><span class="llabel">优惠合计：</span>¥{{orderdata.osaleprice}}</p>
      <p><span class="llabel">运费：</span>¥{{orderdata.oiotprice}}</p> -->
      <p class="allprice"><span class="llabel">实付积分：</span>{{orderdata.opayprice}}积分</p>
    </div>
    <div class="pageback" @click="routeto('orderlist')">
      返回
    </div>
  </div>
</template>

<script>

  export default{
    name: 'orderdetail',
    components: {
    },
    data () {
      return {
        showalert: false,
        showalerttext: '',
        showtoast: false,
        checknum: 1,
        orderdata: {}
      }
    },
    created () {
      const oid = this.$route.query.id
      this.$axios.post(this.apidomain + '/api/integralMall/queryCustItemRecordDetail/' + this.getCookie('appid'), {
        openId: this.getCookie('openid'),
        id: oid
      })
      .then((response) => {
        this.orderdata = response.data.data
      })
    }
  }
</script>
<style lang="less">
@import '../assets/less/order/orderdetail.less';
</style>
